package com.naiterui.ehp.bs.doctor.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;
import java.io.Serializable;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * @Description 经纪人客户（医生）关系表
 * @Author yiren
 * @Date 2022/2/20 10:38 AM
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Entity
@Table(name = "ag_agent_custom")
public class AgAgentCustom implements Serializable {

    private static final long serialVersionUID = 8358060940157591094L;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id")
    private Long id;

    @Column(name = "doctor_id")
    private Long doctorId;

    /**
     * 经纪人ID
     */
    @Column(name = "agent_id")
    private Long agentId;

    /**
     * 大区ID
     */
    @Column(name = "area_id")
    private Long areaId;
    /**
     * 省区ID
     */
    @Column(name = "province_area_id")
    private Long provinceAreaId;

    /**
     * 客户星级
     */
    @Column(name = "star_lev")
    private Integer starLev;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 版本控制
     */
    @Version
    @Column(name = "version")
    private Integer version;
}
